package TAIC.test;

import java.util.Vector;

public class K_BaseImage_TestMode extends TestMode {
	public int loop1Begin () {
		return para.getParaInt( "K_Begin" ) ; 
	}

	public int loop1End () {
		return para.getParaInt( "K_End" ) ; 		
	}
	
	public int loop2Begin () {
		return para.getParaInt( "BaseImage_Begin" ) ; 		
	}
	
	public int loop2End () {
		return para.getParaInt( "BaseImage_End" ) ; 		
	}

	public Vector < Integer > innerLoop () {
		String str =  para.getParaStr("Base_Seperate") ;
		if ( str != null &&  str.equalsIgnoreCase( "on") ) return para.getParaIntList("BaseImage_Begin") ; 
		else return super.innerLoop()  ;
	}
	
	
	public Vector < Integer > outterLoop () {
		String str =  para.getParaStr("K_Seperate") ;
		if ( str != null &&  str.equalsIgnoreCase( "on") ) return para.getParaIntList("K_Begin") ; 
		else return super.outterLoop()  ;
	}
	
	public TestResult test ( DataGen dataGen , int K , int BaseImage ) {
		
//		System.out.println( K + " " +  BaseImage + " " +  para.getParaInt( "Key" )  
//				+ " " + para.getParaInt( "TestImage") + " " +  para.getParaInt( "Iteration" ) + " "  
//				+ " " +  Math.pow(2.0, para.getParaInt( "Lambda" ))  ) ;
		
//		System.out.println ( Math.pow(2.0, para.getParaInt( "Lambda" )) );
		return dataGen.test( K , BaseImage , para.getParaInt( "Key" ) , 
				para.getParaInt( "TestImage"), para.getParaInt( "Iteration" ) ,
				Math.pow(2.0, para.getParaInt( "Lambda" )) , "" ) ;
	}
}
